package com.emily.test.service.impl;

import com.emily.test.mapper.OInformationMapper;
import com.emily.test.model.OInformation;
import com.emily.test.service.OInformationService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service("informationServiceAgent")
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,timeout=36000,rollbackFor=Exception.class)
public class OInformationImpl implements OInformationService {

    @Resource
    private OInformationMapper oInformationMapper;

    @Override
    public List<OInformation> selectInformationByCondition(OInformation oInformation) {
        return oInformationMapper.selectInformationByCondition(oInformation);
    }

    @Override
    public int insertInformation(OInformation oInformation) {
        return oInformationMapper.insertSelective(oInformation);
    }

    @Override
    public int updateInformationById(OInformation oInformation) {
        return oInformationMapper.updateInformationById(oInformation);
    }

    @Override
    public int deleteInformationByIds(List<OInformation> oInformationList) {
        return oInformationMapper.deleteInformationByIds(oInformationList);
    }
}
